import request from '@/utils/request'

/**
 * 获取验证码
 * @param {*} key
 * @returns
 */
export function getCaptcha(key) {
  return request({
    url: '/captcha',
    method: 'get',
    responseType: 'blob',
    params: {
      key
    }
  })
}
/**
 * 测试登录
 */
export function getLogin(data) {
  return request({
    url: '/login',
    method: 'post',
    data
  })
}
// import { createAPI } from '@/utils/request'
// export const getCaptcha = data => createAPI('/captcha' + `?key=${data}`, 'get', data, 'blob')
// export const getLogin = data => createAPI(`/login`, 'post', data)
